// 实现一个filter函数
Array.prototype.myFilter = function (callback) {
  console.log(this);
  let result = []
  for (let i = 0; i < this.length; i++) {
    if (callback(this[i])) {
      result.push(this[i])
    }
  }
  return result
}

let arr = [1, 2, 3, 4, 5, 6, 7, 8]
let arr1 = arr.myFilter((item) => {
  return item > 5
})

